package com.Maykk.Demo01;

/**
 * @ClassName Demo05
 * @Description: TODO 获取字符串
 * @Author: MaykkSTAR@163.com
 * @DATE: 2023/4/17
 */
public class Demo05 {
    public static void main(String[] args) {
        String str = new String();
//        str = null;
        System.out.println("str01= " + str);

        System.out.println("=================================");

        char[] c01 = {'j', 'a', 'v', 'a'};
        String str01 = new String(c01);
        System.out.println("str01= " + str01);


        byte[] bytes = {74, 97, 118, 97};
        String str02 = new String(bytes);
        System.out.println("str02= " + str02);


        String s3 = new String(bytes);
        System.out.println("s3 = " + s3);


        String s4 = "JavaEE";
        System.out.println("s4 = " + s4);


//        byte[] bytes1 = "JAVA".getBytes();
//        System.out.println(Arrays.toString(bytes1));
//        for (int i = 0; i < bytes.length; i++) {
//            System.out.println(bytes1[i]);
//        }
    }
}